package com.xneure.utils.upload;

public class FileItem extends Part{
	private String fileName;

	public FileItem(byte[] fileData){
		super(fileData);
	}
	/**
	 * 处理文件名
	 */
	@Override
	protected void partAnalyze(String contentKey,String key,String value){
		if(contentKey.contains("Content-Disposition") && null != key){
			if(key.contains("filename")){
				fileName = value;
				return;
			}
		}
		super.partAnalyze(contentKey,key,value);
	}

	public String getFileName(){
		return fileName;
	}
}
